﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="DangKy.aspx.cs" Inherits="DangKy" Title="Đăng ký" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br />
 <script type="text/javascript">
  
     var defaultText = "Dùng đề đăng nhập Gtech";
    function WaterMark(txt, evt)
    {
        if(txt.value.length == 0 && evt.type == "blur")
        {
            txt.style.color = "#3366FF";
            txt.value = defaultText;
        }
        if(txt.value == defaultText && evt.type == "focus")
        {
            txt.style.color = "black";
            txt.value="";
        }
    }
       
  </script>
<table style="width:500px" align="center">
         <tr>
             <td style="text-align: center;" colspan="2">
            <asp:Label ID="Label8" runat="server" Font-Bold="True" Font-Size="18pt" 
                ForeColor="#FF6600" Text="ĐĂNG KÝ THÀNH VIÊN"></asp:Label>
             </td>
         </tr>
         <tr>
             <td style="width:120px">
                 Email:</td>
             <td style="width:350px">
                 <asp:TextBox ID="txtemail"  runat="server" Width="180px" 
                     onblur = "WaterMark(this, event);" onfocus = "WaterMark(this, event);" 
                     Text="Dùng đề đăng nhập Gtech" ForeColor="#3366FF"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" 
                     ControlToValidate="txtemail" ErrorMessage="( * )"></asp:RequiredFieldValidator>
                 <asp:RegularExpressionValidator ID="RegularExpressionValidator2" 
                     runat="server" ControlToValidate="txtemail" ErrorMessage="Sai định dạng email" 
                     ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
             </td>
         </tr>
         <tr>
             <td style="width:120px">
                 Mật khẩu:</td>
             <td style="width:350px">
                 <asp:TextBox ID="txtmatkhau"  runat="server" Width="180px" TextMode="Password"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" 
                ControlToValidate="txtmatkhau" ErrorMessage="(*)"></asp:RequiredFieldValidator>
             </td>
         </tr>
         <tr>
             <td style="width:120px">
                 Xác nhận mật khẩu:</td>
             <td style="width:350px">
                 <asp:TextBox ID="txtxacnhanmk" runat="server" Width="180px" TextMode="Password"></asp:TextBox>
             &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                ControlToValidate="txtxacnhanmk" ErrorMessage="(*)"></asp:RequiredFieldValidator>
                 <asp:CompareValidator ID="CompareValidator2" runat="server" 
                ControlToCompare="txtmatkhau" ControlToValidate="txtxacnhanmk" 
                CultureInvariantValues="True" ErrorMessage="Nhập lại không đúng" 
                SetFocusOnError="True"></asp:CompareValidator>
             </td>
         </tr>
         <tr>
             <td style="width:120px">
                 Ho Ten:</td>
             <td style="width:350px">
                 <asp:TextBox ID="txthoten" runat="server" Width="180px"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                     ControlToValidate="txthoten" ErrorMessage="( * )"></asp:RequiredFieldValidator>
             </td>
         </tr>
         <tr>
             <td> 
                 Tỉnh/Thành Phố:</td>
             <td>
                 <asp:TextBox ID="txttinhtp" runat="server" Width="180px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" 
                     runat="server" ControlToValidate="txttinhtp" ErrorMessage="( * )"></asp:RequiredFieldValidator>
                                    </td>
         </tr>
         <tr>
             <td>
                 Quận/Huyện&nbsp;</td>
             <td>
                 <asp:TextBox ID="txtquanhuyen" runat="server" Width="180px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator9" 
                     runat="server" ControlToValidate="txtquanhuyen" ErrorMessage="( * )"></asp:RequiredFieldValidator>
                                    </td>
         </tr>
         <tr>
             <td>
                 Địa chỉ :&nbsp;</td>
             <td>
                 <asp:TextBox ID="txtdiachi" runat="server" Width="180px"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                     ControlToValidate="txtdiachi" ErrorMessage="( * )"></asp:RequiredFieldValidator>
             </td>
         </tr>
         <tr>
             <td>
                 Điện Thoại</td>
             <td>
                 <asp:TextBox ID="txtdienthoai" runat="server" Width="180px"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" 
                     ControlToValidate="txtdienthoai" ErrorMessage="( * )"></asp:RequiredFieldValidator>
             </td>
         </tr>
         <tr>
             <td colspan="2" style="text-align: center">
            <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                Text="Đăng Ký" />
&nbsp;<asp:Button ID="Button2" runat="server" Text="Huỷ" CausesValidation="False" 
                onclick="Button2_Click" style="text-align: center" />
        &nbsp;<asp:Button ID="Button3" runat="server" CausesValidation="False" 
                onclick="Button3_Click" Text="Đăng Nhập" />
                 </td>
         </tr>
         <tr>
             <td colspan="2" style="text-align: center">
            <asp:Label ID="lblthongbaotrungma" runat="server" style="text-align: center" 
                     ForeColor="Red"></asp:Label>
             </td>
         </tr>
         <tr>
             <td colspan="2" style="text-align: center">
                
                 &nbsp;</td>
         </tr>
     </table>
</asp:Content>

